<?php
namespace Core\MVC;

class SimpleTextSource implements ITextSource {
    private $texts;
    
    public function get($key) {
        if (!array_key_exists($key, $this->texts)) {
            throw new \Exception("Unknown text key: " . $key);
        }
        
        return $this->texts[$key];
    }
    
    public function setTexts($texts) {
        $this->texts = $texts;
    }
}